chore(ci): add lockfile-lint PR check for yarn.lock injection prevention#7114
Merged
jstirnaman merged 2 commits intorelease/2026-04-20from Apr 20, 2026
Merged
Conversation
Add a GitHub Actions workflow that validates yarn.lock on every PR, ensuring all resolved URLs use HTTPS and point to registry.yarnpkg.com. Prevents lockfile injection attacks where a PR modifies resolved URLs to fetch packages from attacker-controlled hosts. Uses lockfile-lint@5.0.0 via npx (no new dependencies in package.json). SHA-pinned actions, sparse checkout of yarn.lock only, least-privilege permissions.
0453b4d to
13ab3c6
Compare
jstirnaman
added a commit
that referenced
this pull request
Apr 20, 2026
* Telegraf v1.38.3 (#7126) * Updating changelog * Updating plugin list * Updating product version * Updating plugins --------- Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com> * chore(ci): add lockfile-lint PR check to prevent yarn.lock injection (#7114) Add a GitHub Actions workflow that validates yarn.lock on every PR, ensuring all resolved URLs use HTTPS and point to registry.yarnpkg.com. Prevents lockfile injection attacks where a PR modifies resolved URLs to fetch packages from attacker-controlled hosts. Uses lockfile-lint@5.0.0 via npx (no new dependencies in package.json). SHA-pinned actions, sparse checkout of yarn.lock only, least-privilege permissions. * chore(deps): bump dompurify from 3.3.3 to 3.4.0 (#7109) Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.3.3 to 3.4.0. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](cure53/DOMPurify@3.3.3...3.4.0) --- updated-dependencies: - dependency-name: dompurify dependency-version: 3.4.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Release Chronograf v1.11.1 (#7105) * Release Chronograf v1.11.1 * Update content/chronograf/v1/about_the_project/release-notes.md Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com> * Update content/chronograf/v1/about_the_project/release-notes.md Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com> * Update content/chronograf/v1/about_the_project/release-notes.md --------- Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com> Co-authored-by: Daniel Campbell <metalwhirlwind@gmail.com> * feat(products): add oss_repo field for products with public repos (#7106) Adds `oss_repo` to data/products.yml for products that have a public GitHub repository. Each entry captures the repo name and the product's default branch. Presence of the field indicates the product has a public repo; absence indicates it does not (e.g., v3 Enterprise, Cloud Dedicated, Cloud Serverless, Clustered, Enterprise v1). This separates repo identity from `namespace`, which currently conflates URL path / menu grouping with GitHub repo name. Templates can derive issue, source, or release URLs from `oss_repo.name` + `oss_repo.branch` without hardcoded product fixups. For multi-version products (influxdb OSS v1/v2), `branch` uses a version-keyed map consistent with other versioned fields like `content_path` and `latest_patches`. Groundwork for #7095 feedback-button routing redesign. Co-authored-by: Claude <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jakub Bednář <jakub.bednar@gmail.com> Co-authored-by: Daniel Campbell <metalwhirlwind@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a GitHub Actions workflow that validates
yarn.lockon every PR, preventing lockfile injection attacks.What it does
Runs
lockfile-lint(v5.0.0, vianpx) to verify that everyresolvedURL inyarn.lock:http://,git://, or bare URLs)registry.yarnpkg.com(rejects unknown/attacker-controlled hosts)Why this matters
Lockfile injection is a supply-chain attack where a PR modifies
yarn.lockto redirect package resolution to attacker-controlled hosts. The change is easy to miss in code review because lockfiles are large and auto-generated. This check catches it automatically.Reference: Lockfile injection research (Liran Tal, 2019)
Workflow design
yarn.lockyarn.lock(not the full repo)actions/checkout@v6.0.2,actions/setup-node@v6.3.0permissions: contents: read,persist-credentials: falsenpx --yes lockfile-lint@5.0.0(not added topackage.json)Baseline verified
All 802
resolvedentries inyarn.lockcurrently point tohttps://registry.yarnpkg.com/— no false positives expected.Test plan
actionlintpasses on the new workflowlockfile-lintreports "No issues detected" on currentyarn.lockhttp://evil.example.com) correctly detected and exits non-zero